package com.allwees.core.common.util;

import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;

public class ImageUtil {

    /**
     * 根据文件后缀判断是否图片格式
     *
     * @param suffix
     * @return
     */
    public static boolean isImage(String suffix) {
        return ArrayUtils.contains(new String[] {"jpg", "jpeg", "gif", "bmp", "png", "svg", "tiff"},
                StringUtils.lowerCase(suffix).replace(".", ""));
    }
}
